<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件解绑</title>
</head>
<body>
<input type="button" value="点击" class="b1"/>
<input type="button" value="禁止点击" class="b2"/>
<script>
    var oBtn=document.querySelector(".b1");
    var oBtn1=document.querySelector(".b2");
    oBtn.onclick=function(){
        alert(1);
    };
    setTimeout(function(){
        oBtn.onclick=null;
        console.log("已经解绑");
    },5000);

</script>
</body>
</html>